package com.xiangmo.travel.Entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName user
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("user")
public class User implements Serializable {
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId("id")
    private Long id;
    private String username;
    private String password;
    private String name;
    private int sex;
    private String email;
    @Builder.Default
    private String signature = "空空如也，这个人很懒~";
    private int age;
    private String phone;
    @Builder.Default
    private String about = "本人性格热情开朗，待人友好，为人诚实谦虚。工作勤奋，认真负责，能吃苦耐劳，尽职尽责，有耐心。具有亲和力，平易近人，善于与人沟通。";
    @Builder.Default
    private String image = "http://hlwj2526.xyz/images/icon/initicon.png";
    @Builder.Default
    private Date createdAt = new Date();
    @Builder.Default
    private Date updateAt = new Date();
}